import { src, dest } from 'gulp'
import babel from 'gulp-babel'
import plumber from 'gulp-plumber'
import eslint from 'gulp-eslint'
import Config from '../config'

class Script {
  static build() {
    return src(Config.script.src)
      .pipe(plumber(Config.plumber))
      .pipe(babel())
      .pipe(dest(Config.script.dest))
  }
  static eslint() {
    return src(Config.script.src)
      .pipe(eslint())
      .pipe(eslint.format())
  }
}

export default Script